package com.sys.basics.config.constant;

public class ScheduleConstant {

    public static final String JOB_PARAM_KEY = "JOB_PARAM_KEY";

    public static final String METHOD_NAME = "execute";

    public final static String JOB_NAME_PREFIX = "TASK_";

    public enum ExecuteResult {
        // 成功
        SUCCESS(1, "成功"),
        // 暂停
        FAILED(0, "失败");

        int status;
        String name;

        ExecuteResult(int status, String name) {
            this.status = status;
            this.name = name;
        }

        public int getStatus() {
            return status;
        }

        public String getName() {
            return name;
        }
    }

    public enum ScheduleStatus {
        // 运行
        RUNNING(1, "运行"),
        // 暂停
        PAUSE(0, "暂停");

        int status;
        String name;

        ScheduleStatus(int status, String name) {
            this.status = status;
            this.name = name;
        }

        public int getStatus() {
            return status;
        }

        public String getName() {
            return name;
        }
    }

}
